﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucDireccion.ascx.cs"
    Inherits="wRegPadron.frmOpciones.ucDireccion" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:UpdatePanel runat="server" ID="upDireccion">
    <ContentTemplate>
        <table width="100%">
            <tr>
                <td style="padding-left: 10px;" valign="top" align="left">
                    <fieldset>
                        <legend>
                            <h3>
                                <asp:Label runat="server" ID="lblTitulo" CssClass="tdSubTituloVentana"></asp:Label>
                                <p>
                                    <small>
                                        <asp:Label runat="server" ID="lblDescripcion" CssClass="tdCampoTextoManual"></asp:Label></small></p>
                            </h3>
                        </legend>
                    </fieldset>
                </td>
            </tr>
            <tr>
                <td align="left">
                    <cc1:TabContainer runat="server" ID="tcDireccion" Height="450" Font-Names="Arial"
                        Font-Size="12pt" Width="95%" ActiveTabIndex="1">
                        <cc1:TabPanel runat="server" ID="tpDomicilios" ForeColor="Green" BackColor="Green"
                            Width="100%">
                            <HeaderTemplate>
                                Mis domicilios
                            </HeaderTemplate>
                            <ContentTemplate>
                                <table width="100%">
                                    <tr>
                                        <td align="center" width="100%">
                                            <asp:GridView runat="server" ID="gvDomicilios" AutoGenerateColumns="False" OnRowCommand="gvDomicilios_Seleccionar">
                                                <HeaderStyle CssClass="GridHeader" />
                                                <RowStyle CssClass="GridRow" />
                                                <AlternatingRowStyle CssClass="GridAlternateRow" />
                                                <Columns>
                                                    <asp:BoundField HeaderText="Departamento" DataField="Departamento" />
                                                    <asp:BoundField HeaderText="Provicia" DataField="Provincia" />
                                                    <asp:BoundField HeaderText="Distrito" DataField="Distrito" />
                                                    <asp:BoundField HeaderText="Dirección" DataField="SVia4" />
                                                    <asp:ButtonField HeaderText="Editar" CommandName="Editar" ButtonType="Image" ImageUrl="../Imagenes/editar.png">
                                                        <ControlStyle CssClass="tdBotonImage" />
                                                    </asp:ButtonField>
                                                    <asp:ButtonField HeaderText="Eliminar" CommandName="Eliminar" ButtonType="Image"
                                                        ImageUrl="../Imagenes/eliminar.png">
                                                        <ControlStyle CssClass="tdBotonImage" />
                                                    </asp:ButtonField>
                                                </Columns>
                                            </asp:GridView>
                                        </td>
                                    </tr>
                                </table>
                            </ContentTemplate>
                        </cc1:TabPanel>
                        <cc1:TabPanel runat="server" ID="tpRegistrarDomicilios" Width="100%">
                            <HeaderTemplate>
                                Registrar domicilio
                            </HeaderTemplate>
                            <ContentTemplate>
                                <table width="100%">
                                    <tr>
                                        <td>
                                            <br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" width="100%">
                                            <table width="80%">
                                                <tr>
                                                    <td align="center" class="tdCampoTextoNoResaltado" colspan="3">
                                                        <asp:Label runat="server" ID="lblDireccion"></asp:Label><br />
                                                        <br />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left" class="text-info">
                                                        Departamento:
                                                    </td>
                                                    <td align="left" colspan="3">
                                                        <asp:DropDownList runat="server" ID="ddlDepartamento" AutoPostBack="True" Width="220px"
                                                            CssClass="tdCampoValorInput" OnSelectedIndexChanged="ddlDepartamento_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left" class="text-info">
                                                        Provincia:
                                                    </td>
                                                    <td align="left" colspan="3">
                                                        <asp:DropDownList runat="server" ID="ddlProvincia" Width="220px" AutoPostBack="True"
                                                            CssClass="tdCampoValorInput" OnSelectedIndexChanged="ddlProvincia_SelectedIndexChanged">
                                                            <asp:ListItem Text="-------Seleccione una provincia-------" Value="-1"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left" class="text-info">
                                                        Distrito:
                                                    </td>
                                                    <td align="left" colspan="3">
                                                        <asp:DropDownList runat="server" ID="ddlDistrito" Width="220px" CssClass="tdCampoValorInput"
                                                            OnSelectedIndexChanged="ddlDistrito_SelectedIndexChanged" AutoPostBack="True">
                                                            <asp:ListItem Text="---------Seleccione un distrito---------" Value="-1"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left" class="text-info">
                                                        Vía:
                                                    </td>
                                                    <td align="left">
                                                        <asp:DropDownList runat="server" ID="ddlVia" Width="100px" CssClass="tdCampoValorInput"
                                                            AutoPostBack="True" OnSelectedIndexChanged="ddlVia_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                    </td>
                                                    <td align="left">
                                                        <asp:TextBox runat="server" ID="txtVia" Width="250px" CssClass="tdCampoValorInput"></asp:TextBox>
                                                        <asp:DropDownList runat="server" ID="ddlViaJesusMaria" CssClass="tdCampoValorInput"
                                                            Width="250px">
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left" class="text-info">
                                                        Nro/Km/Mz:
                                                    </td>
                                                    <td align="left">
                                                        <asp:DropDownList runat="server" ID="ddlManzana" Width="100px" CssClass="tdCampoValorInput">
                                                        </asp:DropDownList>
                                                    </td>
                                                    <td align="left">
                                                        <asp:TextBox runat="server" ID="txtManzana" Width="40px" MaxLength="5" CssClass="tdCampoValorInput"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left" class="text-info">
                                                        Int/Dpto/Lote:
                                                    </td>
                                                    <td align="left">
                                                        <asp:DropDownList runat="server" ID="ddlDepa" Width="100px" CssClass="tdCampoValorInput">
                                                        </asp:DropDownList>
                                                    </td>
                                                    <td align="left">
                                                        <asp:TextBox runat="server" ID="txtDepa" Width="40px" MaxLength="6" CssClass="tdCampoValorInput"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left" class="text-info">
                                                        Zona:
                                                    </td>
                                                    <td align="left">
                                                        <asp:DropDownList runat="server" ID="ddlZona" Width="100px" CssClass="tdCampoValorInput">
                                                        </asp:DropDownList>
                                                    </td>
                                                    <td align="left">
                                                        <asp:TextBox runat="server" ID="txtZona" Width="250px" CssClass="tdCampoValorInput"></asp:TextBox>
                                                    </td>
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="4">
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="4">
                                                        <asp:TextBox runat="server" ID="txtBuscar" Visible="False"></asp:TextBox>
                                                        <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" ServicePath="../Service1.asmx"
                                                            runat="server" MinimumPrefixLength="2" ServiceMethod="DireccionJesusmaria" TargetControlID="txtBuscar"
                                                            Enabled="True" DelimiterCharacters="">
                                                        </cc1:AutoCompleteExtender>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <br />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="4" align="center">
                                                        <asp:Button runat="server" ID="btnGuardar" Text="Guardar" CssClass="btn"
                                                            OnClick="btnGuardar_Click" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="4" align="center">
                                                        <asp:Label runat="server" ID="lblErrorRegistroDireccion" CssClass="text-error"></asp:Label>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </ContentTemplate>
                        </cc1:TabPanel>
                    </cc1:TabContainer>
                </td>
            </tr>
        </table>
    </ContentTemplate>
</asp:UpdatePanel>
